package com.pair.micro.common.exception;

import com.pair.micro.common.constant.MicroBusinessError;
import lombok.Getter;

/**
 * 参数校验异常
 * @author xubz
 */
public class MicroArgsNotValidException extends RuntimeException {

    @Getter
    private MicroBusinessError microBusinessError;

    public MicroArgsNotValidException() {
        super(MicroBusinessError.BIS_10007.getMsg());
    }

    public MicroArgsNotValidException(MicroBusinessError microBusinessError) {
        super(microBusinessError.getMsg());
        this.microBusinessError = microBusinessError;
    }

    public MicroArgsNotValidException(MicroBusinessError microBusinessError, String exception) {
        super(exception);
        this.microBusinessError = microBusinessError;
    }
}
